package com.artifact.mit.mypoint.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.artifact.mit.mypoint.model.SourceSummary;
import com.artifact.mit.mypoint.R;

public class SourceSummaryAdapter extends ArrayAdapter<SourceSummary>{
	
	public SourceSummaryAdapter (Context context) {
		super(context, 0);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = LayoutInflater.from(getContext()).inflate(
					R.layout.source_summary_row_item, null);
		}
		
		TextView point_issuer = (TextView) convertView.findViewById(R.id.textView4);
		TextView source = (TextView) convertView.findViewById(R.id.textView5);
		TextView exchange = (TextView) convertView.findViewById(R.id.textView6);
		
		point_issuer.setText(getItem(position).point_issuer);
		source.setText(getItem(position).source);
		exchange.setText(getItem(position).exchange);
		
		return convertView;
	}


}
